<template lang="">
  <el-table :data="dataItem" stripe style="width: 100%">
    <el-table-column prop="factor_name" label="名称" />
    <el-table-column prop="factor_code" label="编码" />
    <el-table-column prop="factor_val" label="均值" />
    <el-table-column prop="factor_val_rtd" label="实时" />
  </el-table>
</template>
<script>
import toolAction from "@/tool/http/tool-action";

let thingsDeviceDataItemApi = toolAction.init("things_device_data_item");
export default {
  props: {
    comCode: {
      type: String,
      required: true,
    },
  },
  data() {
    return {
      dataItem: [],
    };
  },
  mounted() {
    this.init(this.comCode);
  },
  methods: {
    init(dataId) {
      thingsDeviceDataItemApi
        .list({
          rules: {
            data_id__eq: dataId,
          },
        })
        .then((res) => {
          this.dataItem = res;
        });
    },
  },
};
</script>
<style lang=""></style>
